package tvv.levelup.model;

import java.util.HashSet;
import java.util.Set;

/**
 * Created by VLAD on 29.06.2014.
 */
public class Player {
    private int id;
    private String name;
    private int score;
    private Set cars = new HashSet();

    public Player() {

    }

    public Player(String name, int score) {
        this.name = name;
        this.score = score;
    }

    public int getId() {
        return id;
    }

    protected void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public Set getCars() {
        return cars;
    }

    public void setCars(Set cars) {
        this.cars = cars;
    }

    public void addCar(Car car){this.cars.add(car);}

    @Override
    public String toString() {
        return "Player{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", score=" + score +
                ", cars=" + cars +
                '}';
    }
}
